<template>
    <div id="bottomnav" style="height:100%;">
            <tabbar style="width:100%;position:fixed;left:0;" slot="bottom">
                <tabbar-item :selected="isselect1 && s" :link="{path:'/'}">
                  <i slot="icon"  class="iconfont icon-shebei"></i>               
                    <span slot="label">设备</span>
                </tabbar-item>
                <tabbar-item :selected="isselect2"  :link="{path:'/lab'}">
                  <i  class="iconfont icon-tianjiashiyanshi" slot="icon"></i>             
                    <span slot="label">实验室</span>
                </tabbar-item>
                <tabbar-item :selected="isselect3" :link="{path:'/Mycenter'}">
                  <i  class="iconfont icon-gerenzhongxin" slot="icon"></i>
                    <span slot="label">个人中心</span>
                </tabbar-item>
            </tabbar>
    </div>
</template>
<script type="text/javascript">
import {Tabbar, TabbarItem, ViewBox} from 'vux'
export default{
  data () {
    return {
      s: true
    }
  },
  computed: {
    isselect1 () {
      return this.$route.path === '/'
    },
    isselect2 () {
      return this.$route.path === '/lab'
    },
    isselect3 () {
      return this.$route.path === '/Mycenter'
    }
  },
  components: {
    Tabbar,
    TabbarItem,
    ViewBox
  },
  created () {
  }
}
</script>
<style lang="less">

</style> 
